package com.yootk.main;

import com.yootk.bean.vo.Message;
import com.yootk.bean.vo.bean.YootkProfile;
import com.yootk.event.YootkEvent;
import com.yootk.event.lisner.YootkEventLisner;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class SpringAnnotationLisner {
    private static final Logger LOGGER = LoggerFactory.getLogger(SpringAnnotationLisner.class);
    public static void main(String[] args) {
        AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext() ;
        context.getEnvironment().setActiveProfiles("dev");
        context.register(YootkEventLisner.class);
        context.refresh();
        YootkEvent event = new YootkEvent("sun xian") ;
        context.publishEvent(event);
    }
}